﻿using System.Windows.Forms;

namespace Kugar.UI.WinForm
{
    public partial class ContextMenuStripEx : ContextMenuStrip
    {
        public ContextMenuStripEx ()
        {
            InitializeComponent();

            IsAutoClearValue = false;
        }

        public object Value { set; get; }

        public bool IsAutoClearValue { set; get; }

        private void ContextMenuStripEx_Closed ( object sender, ToolStripDropDownClosedEventArgs e )
        {
            if (IsAutoClearValue)
            {
                Value = null;
            }
        }


    }
}
